imagemap

Purpose

A imagemap component is a special image. It accepts whatever properties an image component accepts. However, unlike image, if a user clicks on the image, an onClick event is sent back to the server with the coordinates of the mouse position. In contrast, the onClick event sent by image doesn't contain the coordinates.The coordinates of the mouse position are screen pixels counted from the upper-left corner of the image beginning with (0, 0). It is stored as instance of org.zkoss.zk.ui.event .MouseEvent. Once the application receives the onClick event, it could examine the coordinates of the mouse position from the getX and getY methods.

Examples

<z:image src="/img/earth.jpg" onClick="alert(event.x + ',' +event.y)"/>

Description

Attributes

ZK Official Reference

Component Reference

Show imagemap Component Reference

Java API

Show imagemap Java API